<?php
include('includes.php');
include('adminheader.php');

// Setup Table for Settings
$crud = new ajaxCRUD('Settings', tSettings, $pk, $acFolder);

// Crud Guidance
$crud->omitPrimaryKey();
$crud->disallowAdd();
$crud->disallowDelete();
$crud->setOrientation('vertical');
$crud->displayAs('site_email', 'Website Email');
$crud->displayAs('default_template', 'Default Template');
$crud->displayAs('default_block', 'Default Block');
$crud->displayAs('default_page', 'Default Page');

// Default Template DropDown Selection //////////////////////////////
$allowable_vals = templateFiles();
$crud->defineAllowableValues('default_template', $allowable_vals);

// Default Block DropDown Selection //////////////////////////////
$allowable_vals2 = blockFiles();
$crud->defineAllowableValues('default_block', $allowable_vals2);

// Default Page DropDown Selection //////////////////////////////
$allowable_vals3 = getPages();
$crud->defineAllowableValues('default_page', $allowable_vals3);

include('adminfooter.php');
